package thread.readandwritelock;

/**
 * @author: cuihao
 * @create: 2020-07-17 19:24
 **/
public class StampedLock {
    private final java.util.concurrent.locks.StampedLock lock = new java.util.concurrent.locks.StampedLock();

    public static void main(String[] args) {
        StampedLock stampedLock = new StampedLock();

    }

    void move(int a, int b) {
        try {
            Long l = lock.readLock();
            System.out.println("Nihao");
        } catch (Exception e) {
            System.out.println("Buhao");
        }
    }
}
